import java.io.*;
import java.util.Scanner;

public class MyHead {
    public static void main(String[] args) {
        File file =new File("20165317.txt");
        RandomAccessFile in = null;
        Scanner scanner =new Scanner(System.in);
        try {
            in = new RandomAccessFile(file,"rw");
            long position = 0;
            in.seek(position);
            int a = scanner.nextInt();
            for (int i=0;i<a;i++){
                String str = in.readLine();
                byte b[] = str.getBytes("iso-8859-1");
                str = new String(b);
                position = in.getFilePointer();
                System.out.println(str);
            }

        }
        catch (IOException e){}
    }
}
